package org.csu.forum.domain.VO;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import org.csu.forum.domain.PO.Account;
import org.csu.forum.domain.PO.Login;
import org.springframework.stereotype.Component;

import java.io.Serializable;

@Data
@Component
@JsonIgnoreProperties(value = {"handler"})
public class AccountregisterVO implements Serializable {

    private static final long serialVersionUID = 8751282105532159742L;

    private Account account;
    private Login login;

    private int userid;
    private String username;
    private String phonenumber;


    private String password;


    AccountregisterVO(){
        this.account = new Account();
        this.login = new Login();
    }

    public Account getAccount() {
        return account;
    }

    public void setAccount(Account account) {
        this.account = account;

    }

    public Login getLogin() {
        return login;
    }

    public void setLogin(Login login) {

        this.login = login;

    }

    public void setParameter(){

        this.account.setUserid(this.userid);
        this.account.setPhonenumber(this.phonenumber);
        this.account.setUsername(this.username);
        this.login.setUserid(this.userid);
        this.login.setPassword(this.password);

    }

}
